\hypertarget{class_main_state}{\section{Main\-State Class Reference}
\label{class_main_state}\index{Main\-State@{Main\-State}}
}


{\ttfamily \#include $<$Main\-State.\-h$>$}

Inheritance diagram for Main\-State\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{class_main_state}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_main_state_a77c93b0c85d8fc62711a51d041e06154}{Main\-State} (void)
\item 
\hyperlink{class_main_state_aa0ac2df6fc0e12ee4afa6713b2534c74}{$\sim$\-Main\-State} (void)
\item 
void \hyperlink{class_main_state_a3f5551acd1ce1137de961a91e89983be}{update\-Game} (int timer)
\item 
void \hyperlink{class_main_state_ade0581557833ba68939eb7ac7bba7854}{render\-Game} (float interpolation)
\item 
void \hyperlink{class_main_state_ab4e535f65024f7e0d9fbada13bc7b641}{handle\-Input} (G\-L\-F\-Wwindow $\ast$window)
\item 
void \hyperlink{class_main_state_ab3319cf800410b4a3a5aed19ce242f21}{load\-Shader} (const char $\ast$vertex, const char $\ast$fragment)
\item 
long \hyperlink{class_main_state_a87eb6bb57218c385762b78e069e7ff35}{state\-Changer} ()
\item 
long \hyperlink{class_main_state_aab4b71831fb341d73f85ae43a5587f65}{get\-Key\-Code} ()
\item 
void \hyperlink{class_main_state_a94ee0dc0f5ec2fd60e08b9a48d09b4ab}{re\-Init} ()
\item 
void \hyperlink{class_main_state_aa4959f936beed6ef182d3e1ddf97cbfd}{init} ()
\item 
void \hyperlink{class_main_state_a1e91a9046ec6f260e1d39583ca89dfc6}{init\-Objects} ()
\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{class_main_state_a85be15f12ed6ad2c1e1938e00bf305a2}{has\-Been\-Loaded}
\item 
G\-Luint \hyperlink{class_main_state_a9bbe42adad4936332629f796f588dd6f}{V\-B\-O}
\item 
G\-Luint \hyperlink{class_main_state_a55f719888c879d2cd5d30be07612a992}{V\-B\-O2}
\item 
G\-Luint \hyperlink{class_main_state_abb86c5bc8e54aca911c6da04b127727c}{V\-A\-O}
\item 
\hyperlink{class_load_shader}{Load\-Shader} $\ast$ \hyperlink{class_main_state_ac518c71a111d277141ee11dffcc611a6}{loadshader}
\item 
\hyperlink{class_matrix4f}{Matrix4f} $\ast$ \hyperlink{class_main_state_acd6f7c2997796f73d23e47b80be302b6}{world}
\item 
G\-Luint \hyperlink{class_main_state_a147d4f1158e786b3632ff8db2262bcd9}{Shader\-Program}
\item 
long \hyperlink{class_main_state_af70ad331225b914157e9f21ca7f4d862}{change\-State}
\end{DoxyCompactItemize}
\subsection*{Static Private Attributes}
\begin{DoxyCompactItemize}
\item 
static const char $\ast$ \hyperlink{class_main_state_a5822bf0c89e8f0767e8784b807fb7220}{p\-V\-S}
\item 
static const char $\ast$ \hyperlink{class_main_state_a04ea113a6e0865225d2251e49525c4e9}{p\-F\-S}
\item 
static const long \hyperlink{class_main_state_aa75e78913b3243093c8658a1bd02fc3f}{keycode} = 200000000\-L
\end{DoxyCompactItemize}


\subsection{Detailed Description}


Definition at line 17 of file Main\-State.\-h.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_main_state_a77c93b0c85d8fc62711a51d041e06154}{\index{Main\-State@{Main\-State}!Main\-State@{Main\-State}}
\index{Main\-State@{Main\-State}!MainState@{Main\-State}}
\subsubsection[{Main\-State}]{\setlength{\rightskip}{0pt plus 5cm}Main\-State\-::\-Main\-State (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{class_main_state_a77c93b0c85d8fc62711a51d041e06154}


Definition at line 37 of file Main\-State.\-cpp.



References change\-State, has\-Been\-Loaded, loadshader, N\-U\-L\-L, Shader\-Program, V\-A\-O, V\-B\-O, V\-B\-O2, and world.

\hypertarget{class_main_state_aa0ac2df6fc0e12ee4afa6713b2534c74}{\index{Main\-State@{Main\-State}!$\sim$\-Main\-State@{$\sim$\-Main\-State}}
\index{$\sim$\-Main\-State@{$\sim$\-Main\-State}!MainState@{Main\-State}}
\subsubsection[{$\sim$\-Main\-State}]{\setlength{\rightskip}{0pt plus 5cm}Main\-State\-::$\sim$\-Main\-State (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{class_main_state_aa0ac2df6fc0e12ee4afa6713b2534c74}


Definition at line 52 of file Main\-State.\-cpp.



References Shader\-Program.



\subsection{Member Function Documentation}
\hypertarget{class_main_state_aab4b71831fb341d73f85ae43a5587f65}{\index{Main\-State@{Main\-State}!get\-Key\-Code@{get\-Key\-Code}}
\index{get\-Key\-Code@{get\-Key\-Code}!MainState@{Main\-State}}
\subsubsection[{get\-Key\-Code}]{\setlength{\rightskip}{0pt plus 5cm}long Main\-State\-::get\-Key\-Code (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{class_main_state_aab4b71831fb341d73f85ae43a5587f65}


Implements \hyperlink{class_state_machine_a39949e8a92cdca4854ac5394d6e0ba42}{State\-Machine}.



Definition at line 172 of file Main\-State.\-cpp.



References keycode.

\hypertarget{class_main_state_ab4e535f65024f7e0d9fbada13bc7b641}{\index{Main\-State@{Main\-State}!handle\-Input@{handle\-Input}}
\index{handle\-Input@{handle\-Input}!MainState@{Main\-State}}
\subsubsection[{handle\-Input}]{\setlength{\rightskip}{0pt plus 5cm}void Main\-State\-::handle\-Input (
\begin{DoxyParamCaption}
\item[{G\-L\-F\-Wwindow $\ast$}]{window}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{class_main_state_ab4e535f65024f7e0d9fbada13bc7b641}


Implements \hyperlink{class_state_machine_a2f89dc242f85ca11d6eb400ffa6499bf}{State\-Machine}.



Definition at line 73 of file Main\-State.\-cpp.



References change\-State.

\hypertarget{class_main_state_aa4959f936beed6ef182d3e1ddf97cbfd}{\index{Main\-State@{Main\-State}!init@{init}}
\index{init@{init}!MainState@{Main\-State}}
\subsubsection[{init}]{\setlength{\rightskip}{0pt plus 5cm}void Main\-State\-::init (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{class_main_state_aa4959f936beed6ef182d3e1ddf97cbfd}


Implements \hyperlink{class_state_machine_a603ac1e07086d9b031f47ce1fe3b87b5}{State\-Machine}.



Definition at line 62 of file Main\-State.\-cpp.



References init\-Objects(), load\-Shader(), loadshader, p\-F\-S, p\-V\-S, and Shader\-Program.



Referenced by re\-Init().

\hypertarget{class_main_state_a1e91a9046ec6f260e1d39583ca89dfc6}{\index{Main\-State@{Main\-State}!init\-Objects@{init\-Objects}}
\index{init\-Objects@{init\-Objects}!MainState@{Main\-State}}
\subsubsection[{init\-Objects}]{\setlength{\rightskip}{0pt plus 5cm}void Main\-State\-::init\-Objects (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_main_state_a1e91a9046ec6f260e1d39583ca89dfc6}


Definition at line 69 of file Main\-State.\-cpp.



References world.



Referenced by init().

\hypertarget{class_main_state_ab3319cf800410b4a3a5aed19ce242f21}{\index{Main\-State@{Main\-State}!load\-Shader@{load\-Shader}}
\index{load\-Shader@{load\-Shader}!MainState@{Main\-State}}
\subsubsection[{load\-Shader}]{\setlength{\rightskip}{0pt plus 5cm}void Main\-State\-::load\-Shader (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{vertex, }
\item[{const char $\ast$}]{fragment}
\end{DoxyParamCaption}
)}}\label{class_main_state_ab3319cf800410b4a3a5aed19ce242f21}


Definition at line 56 of file Main\-State.\-cpp.



References Load\-Shader\-::compile\-Shaders(), loadshader, and Shader\-Program.



Referenced by init().

\hypertarget{class_main_state_a94ee0dc0f5ec2fd60e08b9a48d09b4ab}{\index{Main\-State@{Main\-State}!re\-Init@{re\-Init}}
\index{re\-Init@{re\-Init}!MainState@{Main\-State}}
\subsubsection[{re\-Init}]{\setlength{\rightskip}{0pt plus 5cm}void Main\-State\-::re\-Init (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{class_main_state_a94ee0dc0f5ec2fd60e08b9a48d09b4ab}


Implements \hyperlink{class_state_machine_aec67074ebf4261300ba77d216ac156bd}{State\-Machine}.



Definition at line 160 of file Main\-State.\-cpp.



References change\-State, has\-Been\-Loaded, init(), and Shader\-Program.

\hypertarget{class_main_state_ade0581557833ba68939eb7ac7bba7854}{\index{Main\-State@{Main\-State}!render\-Game@{render\-Game}}
\index{render\-Game@{render\-Game}!MainState@{Main\-State}}
\subsubsection[{render\-Game}]{\setlength{\rightskip}{0pt plus 5cm}void Main\-State\-::render\-Game (
\begin{DoxyParamCaption}
\item[{float}]{interpolation}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{class_main_state_ade0581557833ba68939eb7ac7bba7854}


Implements \hyperlink{class_state_machine_a0fabb1a7bbbda3158636cec08623a66e}{State\-Machine}.



Definition at line 88 of file Main\-State.\-cpp.



References V\-A\-O.

\hypertarget{class_main_state_a87eb6bb57218c385762b78e069e7ff35}{\index{Main\-State@{Main\-State}!state\-Changer@{state\-Changer}}
\index{state\-Changer@{state\-Changer}!MainState@{Main\-State}}
\subsubsection[{state\-Changer}]{\setlength{\rightskip}{0pt plus 5cm}long Main\-State\-::state\-Changer (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{class_main_state_a87eb6bb57218c385762b78e069e7ff35}


Implements \hyperlink{class_state_machine_aab3dd552f209ece70f8913a5fd4449db}{State\-Machine}.



Definition at line 156 of file Main\-State.\-cpp.



References change\-State.

\hypertarget{class_main_state_a3f5551acd1ce1137de961a91e89983be}{\index{Main\-State@{Main\-State}!update\-Game@{update\-Game}}
\index{update\-Game@{update\-Game}!MainState@{Main\-State}}
\subsubsection[{update\-Game}]{\setlength{\rightskip}{0pt plus 5cm}void Main\-State\-::update\-Game (
\begin{DoxyParamCaption}
\item[{int}]{timer}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{class_main_state_a3f5551acd1ce1137de961a91e89983be}


Implements \hyperlink{class_state_machine_a6ed723b00e78eac46515b636c5a8481e}{State\-Machine}.



Definition at line 84 of file Main\-State.\-cpp.



\subsection{Member Data Documentation}
\hypertarget{class_main_state_af70ad331225b914157e9f21ca7f4d862}{\index{Main\-State@{Main\-State}!change\-State@{change\-State}}
\index{change\-State@{change\-State}!MainState@{Main\-State}}
\subsubsection[{change\-State}]{\setlength{\rightskip}{0pt plus 5cm}long Main\-State\-::change\-State\hspace{0.3cm}{\ttfamily [private]}}}\label{class_main_state_af70ad331225b914157e9f21ca7f4d862}


Definition at line 58 of file Main\-State.\-h.



Referenced by handle\-Input(), Main\-State(), re\-Init(), and state\-Changer().

\hypertarget{class_main_state_a85be15f12ed6ad2c1e1938e00bf305a2}{\index{Main\-State@{Main\-State}!has\-Been\-Loaded@{has\-Been\-Loaded}}
\index{has\-Been\-Loaded@{has\-Been\-Loaded}!MainState@{Main\-State}}
\subsubsection[{has\-Been\-Loaded}]{\setlength{\rightskip}{0pt plus 5cm}bool Main\-State\-::has\-Been\-Loaded\hspace{0.3cm}{\ttfamily [private]}}}\label{class_main_state_a85be15f12ed6ad2c1e1938e00bf305a2}


Definition at line 41 of file Main\-State.\-h.



Referenced by Main\-State(), and re\-Init().

\hypertarget{class_main_state_aa75e78913b3243093c8658a1bd02fc3f}{\index{Main\-State@{Main\-State}!keycode@{keycode}}
\index{keycode@{keycode}!MainState@{Main\-State}}
\subsubsection[{keycode}]{\setlength{\rightskip}{0pt plus 5cm}const long Main\-State\-::keycode = 200000000\-L\hspace{0.3cm}{\ttfamily [static]}, {\ttfamily [private]}}}\label{class_main_state_aa75e78913b3243093c8658a1bd02fc3f}


Definition at line 56 of file Main\-State.\-h.



Referenced by get\-Key\-Code().

\hypertarget{class_main_state_ac518c71a111d277141ee11dffcc611a6}{\index{Main\-State@{Main\-State}!loadshader@{loadshader}}
\index{loadshader@{loadshader}!MainState@{Main\-State}}
\subsubsection[{loadshader}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Load\-Shader}$\ast$ Main\-State\-::loadshader\hspace{0.3cm}{\ttfamily [private]}}}\label{class_main_state_ac518c71a111d277141ee11dffcc611a6}


Definition at line 49 of file Main\-State.\-h.



Referenced by init(), load\-Shader(), and Main\-State().

\hypertarget{class_main_state_a04ea113a6e0865225d2251e49525c4e9}{\index{Main\-State@{Main\-State}!p\-F\-S@{p\-F\-S}}
\index{p\-F\-S@{p\-F\-S}!MainState@{Main\-State}}
\subsubsection[{p\-F\-S}]{\setlength{\rightskip}{0pt plus 5cm}const char $\ast$ Main\-State\-::p\-F\-S\hspace{0.3cm}{\ttfamily [static]}, {\ttfamily [private]}}}\label{class_main_state_a04ea113a6e0865225d2251e49525c4e9}
{\bfseries Initial value\-:}
\begin{DoxyCode}
= \textcolor{stringliteral}{"                                                      \(\backslash\)n\(\backslash\)}
\textcolor{stringliteral}{#version 330                                                                      \(\backslash\)n\(\backslash\)}
\textcolor{stringliteral}{                                                                                    \(\backslash\)n\(\backslash\)}
\textcolor{stringliteral}{                                                                                    \(\backslash\)n\(\backslash\)}
\textcolor{stringliteral}{out vec3 FragColor;                                                                 \(\backslash\)n\(\backslash\)}
\textcolor{stringliteral}{                                                                                    \(\backslash\)n\(\backslash\)}
\textcolor{stringliteral}{void main()                                                                         \(\backslash\)n\(\backslash\)}
\textcolor{stringliteral}{\{                                                                                   \(\backslash\)n\(\backslash\)}
\textcolor{stringliteral}{    FragColor = vec3(0.2,0.6,0.2);                                                  \(\backslash\)n\(\backslash\)}
\textcolor{stringliteral}{\}"}
\end{DoxyCode}


Definition at line 38 of file Main\-State.\-h.



Referenced by init().

\hypertarget{class_main_state_a5822bf0c89e8f0767e8784b807fb7220}{\index{Main\-State@{Main\-State}!p\-V\-S@{p\-V\-S}}
\index{p\-V\-S@{p\-V\-S}!MainState@{Main\-State}}
\subsubsection[{p\-V\-S}]{\setlength{\rightskip}{0pt plus 5cm}const char $\ast$ Main\-State\-::p\-V\-S\hspace{0.3cm}{\ttfamily [static]}, {\ttfamily [private]}}}\label{class_main_state_a5822bf0c89e8f0767e8784b807fb7220}
{\bfseries Initial value\-:}
\begin{DoxyCode}
= \textcolor{stringliteral}{"                                                      \(\backslash\)n\(\backslash\)}
\textcolor{stringliteral}{#version 330                                                                       \(\backslash\)n\(\backslash\)}
\textcolor{stringliteral}{                                                                                    \(\backslash\)n\(\backslash\)}
\textcolor{stringliteral}{layout (location = 0) in vec3 position;                                             \(\backslash\)n\(\backslash\)}
\textcolor{stringliteral}{                                                                                    \(\backslash\)n\(\backslash\)}
\textcolor{stringliteral}{                                                                                    \(\backslash\)n\(\backslash\)}
\textcolor{stringliteral}{void main()                                                                         \(\backslash\)n\(\backslash\)}
\textcolor{stringliteral}{\{                                                                                   \(\backslash\)n\(\backslash\)}
\textcolor{stringliteral}{    gl\_Position = vec4(position, 1.0);                                              \(\backslash\)n\(\backslash\)}
\textcolor{stringliteral}{\}"}
\end{DoxyCode}


Definition at line 37 of file Main\-State.\-h.



Referenced by init().

\hypertarget{class_main_state_a147d4f1158e786b3632ff8db2262bcd9}{\index{Main\-State@{Main\-State}!Shader\-Program@{Shader\-Program}}
\index{Shader\-Program@{Shader\-Program}!MainState@{Main\-State}}
\subsubsection[{Shader\-Program}]{\setlength{\rightskip}{0pt plus 5cm}G\-Luint Main\-State\-::\-Shader\-Program\hspace{0.3cm}{\ttfamily [private]}}}\label{class_main_state_a147d4f1158e786b3632ff8db2262bcd9}


Definition at line 53 of file Main\-State.\-h.



Referenced by init(), load\-Shader(), Main\-State(), re\-Init(), and $\sim$\-Main\-State().

\hypertarget{class_main_state_abb86c5bc8e54aca911c6da04b127727c}{\index{Main\-State@{Main\-State}!V\-A\-O@{V\-A\-O}}
\index{V\-A\-O@{V\-A\-O}!MainState@{Main\-State}}
\subsubsection[{V\-A\-O}]{\setlength{\rightskip}{0pt plus 5cm}G\-Luint Main\-State\-::\-V\-A\-O\hspace{0.3cm}{\ttfamily [private]}}}\label{class_main_state_abb86c5bc8e54aca911c6da04b127727c}


Definition at line 46 of file Main\-State.\-h.



Referenced by Main\-State(), and render\-Game().

\hypertarget{class_main_state_a9bbe42adad4936332629f796f588dd6f}{\index{Main\-State@{Main\-State}!V\-B\-O@{V\-B\-O}}
\index{V\-B\-O@{V\-B\-O}!MainState@{Main\-State}}
\subsubsection[{V\-B\-O}]{\setlength{\rightskip}{0pt plus 5cm}G\-Luint Main\-State\-::\-V\-B\-O\hspace{0.3cm}{\ttfamily [private]}}}\label{class_main_state_a9bbe42adad4936332629f796f588dd6f}


Definition at line 44 of file Main\-State.\-h.



Referenced by Main\-State().

\hypertarget{class_main_state_a55f719888c879d2cd5d30be07612a992}{\index{Main\-State@{Main\-State}!V\-B\-O2@{V\-B\-O2}}
\index{V\-B\-O2@{V\-B\-O2}!MainState@{Main\-State}}
\subsubsection[{V\-B\-O2}]{\setlength{\rightskip}{0pt plus 5cm}G\-Luint Main\-State\-::\-V\-B\-O2\hspace{0.3cm}{\ttfamily [private]}}}\label{class_main_state_a55f719888c879d2cd5d30be07612a992}


Definition at line 45 of file Main\-State.\-h.



Referenced by Main\-State().

\hypertarget{class_main_state_acd6f7c2997796f73d23e47b80be302b6}{\index{Main\-State@{Main\-State}!world@{world}}
\index{world@{world}!MainState@{Main\-State}}
\subsubsection[{world}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Matrix4f}$\ast$ Main\-State\-::world\hspace{0.3cm}{\ttfamily [private]}}}\label{class_main_state_acd6f7c2997796f73d23e47b80be302b6}


Definition at line 51 of file Main\-State.\-h.



Referenced by init\-Objects(), and Main\-State().



The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
C\-:/\-Users/\-Axel/\-Desktop/informatica/\-Projects/\-Workspace C++/\-Game Engine/src/\-States/\hyperlink{_main_state_8h}{Main\-State.\-h}\item 
C\-:/\-Users/\-Axel/\-Desktop/informatica/\-Projects/\-Workspace C++/\-Game Engine/src/\-States/\hyperlink{_main_state_8cpp}{Main\-State.\-cpp}\end{DoxyCompactItemize}
